<div *ngIf="kiosk_data" class="table-div">
  <div nz-col [nzSpan] = "22" >
  <h2 class="table-title">售货机状态表</h2>
  <nz-table #nzTable [nzDataSource]="kiosk_data" [nzPageSize]="15" nzShowSizeChanger [nzBordered] = "true">
    <thead nz-thead>
    <tr>
      <th nz-th>
        <span>设备ID</span>
        <nz-table-sort [(nzValue)]="sortMap.id" (nzValueChange)="sort('id',$event)"></nz-table-sort>
      </th>
      <th nz-th>
        <span>设备名称</span>
        <nz-table-sort [(nzValue)]="sortMap.name" (nzValueChange)="sort('name',$event)"></nz-table-sort>
      </th>
      <th nz-th>
        <span>当前网络延迟</span>
        <nz-table-sort [(nzValue)]="sortMap.delay" (nzValueChange)="sort('delay',$event)"></nz-table-sort>
      </th>
      <th nz-th>
        <span>是否正常运行</span>
        <nz-table-sort [(nzValue)]="sortMap.isNormal" (nzValueChange)="sort('isNormal',$event)"></nz-table-sort>
      </th>
      <th nz-th>
        <span>门是否关好</span>
        <nz-table-sort [(nzValue)]="sortMap.is_close" (nzValueChange)="sort('is_close',$event)"></nz-table-sort>
      </th>
      <th nz-th>
        <span>货柜温度</span>
        <nz-table-sort [(nzValue)]="sortMap.temp" (nzValueChange)="sort('temp',$event)"></nz-table-sort>
      </th>
      <th nz-th>
        <span>已售空货道</span>
        <nz-table-sort [(nzValue)]="sortMap.empty" (nzValueChange)="sort('empty',$event)"></nz-table-sort>
      </th>
      <th nz-th>
        <span>设备位置</span>
        <nz-table-sort [(nzValue)]="sortMap.addr" (nzValueChange)="sort('addr',$event)"></nz-table-sort>
      </th>
      <th nz-th>
        <span>交互次数</span>
        <nz-table-sort [(nzValue)]="sortMap.mutual" (nzValueChange)="sort('mutual',$event)"></nz-table-sort>
      </th>
      <th nz-th>
        <span>出货失败次数</span>
        <nz-table-sort [(nzValue)]="sortMap.fail" (nzValueChange)="sort('fail',$event)"></nz-table-sort>
      </th>
    </tr>
    </thead>
    <tbody nz-tbody>
    <tr nz-tbody-tr *ngFor="let data of nzTable.data" class="table-tr">
      <td nz-td>{{data.id}}</td>
      <td nz-td>{{data.name}}</td>
      <td nz-td>{{data.delay}}</td>
      <td nz-td>{{data.isNormal}}</td>
      <td nz-td>{{data.is_close}}</td>
      <td nz-td>{{data.temp}}℃</td>
      <td nz-td>{{data.empty}}个</td>
      <td nz-td>{{data.addr}}</td>
      <td nz-td>{{data.mutual}}次</td>
      <td nz-td>{{data.fail}}次</td>
    </tr>
    </tbody>
  </nz-table>



  </div>
</div>
